package com.shanzmoo.db.order.entity.dto;

import com.alibaba.fastjson.JSON;
import com.shanzmoo.db.order.entity.OutletOrderDetailEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * 门店订单明细信息
 * @author Gzhao
 * @date 2020/12/14
 */
@Data
@ApiModel("门店订单明细信息")
public class OutletOrderDetailInfoDto extends OutletOrderDetailSaveDto {

    private static final long serialVersionUID = 1758L;

    @ApiModelProperty(value = "商品id")
    private Integer id;

    public static List<OutletOrderDetailInfoDto> createList(List<OutletOrderDetailEntity> detailList) {
        return JSON.parseArray(JSON.toJSONString(detailList), OutletOrderDetailInfoDto.class);
    }
}
